package com.xbongbong.paas.pojo.workflow.explains;

import com.xbongbong.paas.enums.clazz.ConditionClass;
import com.xbongbong.paas.field.DefaultAttrPoJo;
import com.xbongbong.paas.field.ItemPoJo;
import com.xbongbong.paas.field.NumericalLimitsPoJo;
import com.xbongbong.paas.field.SaasParticularAttributePoJo;
import com.xbongbong.paas.field.LinkInfoPojo;
import com.xbongbong.pro.formexplain.pojo.ValueTypePojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author 吴峰
 * @date 2021/05/25 17:10
 */
@Getter
@Setter
@ToString
public class WorkflowConditionFieldPojo implements Serializable {

    private static final long serialVersionUID = -3854994183851563274L;
    private String attr;

    private Integer fieldType;

    private String dateType;

    private String attrName;

    private Integer visible;

    private Integer editable;

    private DefaultAttrPoJo defaultAttr;

    /**
     * 精度
     */
    private Integer accuracy;
    /**
     * 是否限制数值范围 1：限制；0：不限制
     */
    private Integer numericalLimitsFlag;

    private NumericalLimitsPoJo numericalLimits;

    /**
     * 仅允许填写整数 1：是 0：否
     */
    private Integer integerOnly;

    private Integer comboType;

    /**
     * 用于下拉框，下拉复选，单选，复选的选项值
     */
    private List<ItemPoJo> items;
    /**
     * 是否需要显示详细地址 1：需要 0：不需要
     */
    private Integer showDetailAddress;
    /**
     * 值类型
     */
    private List<ValueTypePojo> valueTypeList;

    private LinkInfoPojo linkInfo;

    /**
     * 关联类型 linkedType为 0 表示PAAS应用内，为其他枚举类型表示关联的SAAS系统模块
     */
    private Integer linkedType;

    private SaasParticularAttributePoJo saasParticularAttributePoJo;

    private List<ConditionClass> conditionList;

    public WorkflowConditionFieldPojo(String attr, Integer fieldType, String attrName, Integer visible, Integer editable) {
        this.attr = attr;
        this.fieldType = fieldType;
        this.attrName = attrName;
        this.visible = visible;
        this.editable = editable;
    }
    public WorkflowConditionFieldPojo(String attr, Integer fieldType, String attrName, Integer visible, Integer editable, SaasParticularAttributePoJo saasParticularAttributePoJo) {
        this.attr = attr;
        this.fieldType = fieldType;
        this.attrName = attrName;
        this.visible = visible;
        this.editable = editable;
        this.saasParticularAttributePoJo = saasParticularAttributePoJo;
    }

}
